package com.project.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.project.bean.LogBean;
import com.project.mapper.LogMapper;
import com.project.service.ILogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.time.LocalDate;
import java.util.List;
@Service
@Transactional
public class LogServiceImpl  implements ILogService {
    @Autowired
    private LogMapper mapper;
    @Override
    public PageInfo<LogBean> findByDate(int page, LocalDate startDate, LocalDate endDate) {
        PageHelper.startPage(page,3);
        PageInfo info = PageInfo.of(mapper.findByDate(startDate,endDate));
        return info;
    }

}
